package com.empire.module.member.dal.mysql.accounttype;

import com.empire.framework.common.pojo.PageResult;
import com.empire.framework.mybatis.core.mapper.BaseMapperX;
import com.empire.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.empire.module.member.dal.dataobject.accounttype.AccountTypeDO;
import org.apache.ibatis.annotations.Mapper;
import com.empire.module.member.controller.admin.accounttype.vo.*;

/**
 * 账号平台 Mapper
 *
 * @author 主席大人
 */
@Mapper
public interface AccountTypeMapper extends BaseMapperX<AccountTypeDO> {

    default PageResult<AccountTypeDO> selectPage(AccountTypePageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<AccountTypeDO>()
                .likeIfPresent(AccountTypeDO::getName, reqVO.getName())
                .betweenIfPresent(AccountTypeDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(AccountTypeDO::getId));
    }

}